home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SCSI Devices SCSI
-
-
-
- _________________________________________________________________
-
- NNAAMMEE
- scsi - Devices used to send arbitrary SCSI commands to SCSI
- devices
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ddeevv//ssccssii..hh>>
-
- _________________________________________________________________
-
-
- DDEESSCCRRIIPPTTIIOONN
- SCSI devices are used to send arbitrary SCSI commands to
- SCSI devices. The interface uses IO-Controls to pass the
- SCSI command block and command data to the device and return
- the command status byte, command data, and any scsi mode
- sense data generated. The IO-Control IIOOCC__SSCCSSII__CCOOMMMMAANNDD takes
- as input a Dev_ScsiCommand and returns in the out buffer a
- Dev_ScsiStatus.
-
- typedef struct Dev_ScsiCommand {
- int bufferLen;
- int dataOffset;
- int commandLen;
- } Dev_ScsiCommand;
- The field bbuuffffeerrLLeenn specifies the length of the command's
- data buffer. The data buffer itself is located in the in
- buffer for commands that send data to the device and the out
- buffer for commands that return data. ddaattaaOOffffsseett specifies
- the offset into the IO-Control's input buffer of the start
- of the data buffer. If bbuuffffeerrLLeenn is greater than zero and
- the ddaattaaOOffffsseett equals the size of the input buffer then the
- command is assumed to return data. The ccoommmmaannddLLeenn field
- specifies the number of bytes following the Dev_ScsiCommand
- structure that make up the SCSI command block.
-
- typedef struct Dev_ScsiStatus {
- int statusByte;
- int amountTransferred;
- int senseDataLen;
- } Dev_ScsiStatus;
- The output buffer of the IIOOCC__SSCCSSII__CCOOMMMMAANNDD command consists
- of a Dev_ScsiStatus followed by any data returned by the
- device followed by any sense data generated by the command.
- The field ssttaattuussBByyttee contains the SCSI status byte as
- returned by the SCSI device and the field aammoouunnttTTrraannssffeerrrreedd
- reports the number of data bytes transferred by the command.
- sseennsseeDDaattaaLLeenn reports the number of bytes of sense data
- returned byte the command. The out buffer looks like:
-
- Dev_ScsiStatus statusBlock;
- char data[statuBlock.amountTransferred];
- char modeSenseData[statuBlock.senseDataLen];
-
-
-
- Sprite v.1.0 Printed: March 15, 1990 1
-
-
-
-
-
-
- SCSI Devices SCSI
-
-
-
- WWAARRNNIINNGG
- The SCSI command set supported by most devices include some
- very destructive commands such as FORMAT_UNIT and
- ERASE_TAPE. Extreme care should be taken when using this
- interface.
-
- KKEEYYWWOORRDDSS
- scsi command, scsi device, HBA
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v.1.0 Printed: March 15, 1990 2
-
-
-
-